// 对外暴露配置路由(常量路由):全部用户都可以访问到的路由
export const constantRoute = [
  {
    path: '/',
    name: 'index',
    // component: () => import('@/views/home/originalIndex.vue'),
    component: () => import('@/views/home/index.vue'),
    meta: {
      title: '系统首页',
      hidden: true,
    },
  },
  {
    path: '/login',
    name: 'login',
    component: () => import('@/views/login/login.vue'),
    meta: {
      title: '登录',
      hidden: true,
    },
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/404/index.vue'),
    meta: {
      title: '404',
      hidden: true,
    },
  },
  {
    path: '/consent',
    name: 'consent',
    component: () => import('@/views/consent/ConsentView.vue'),
    meta: {
      title: '授权',
      hidden: true,
    },
  },
  {
    path: '/activate',
    name: 'activate',
    component: () => import('@/views/device/ActivateView.vue'),
    meta: {
      title: '激活确认',
      hidden: true,
    },
  },
  {
    path: '/activated',
    name: 'activated',
    component: () => import('@/views/device/ActivatedView.vue'),
    meta: {
      title: '激活完成',
      hidden: true,
    },
  },
  {
    path: '/PkceRedirect',
    name: 'PkceRedirect',
    component: () => import('@/views/login/PkceRedirect.vue'),
    meta: {
      title: 'PKCE登录',
      hidden: true,
    },
  },
  {
    path: '/OAuth2Redirect',
    name: 'OAuth2Redirect',
    component: () => import('@/views/login/OAuthRedirect.vue'),
    meta: {
      title: '授权码登录',
      hidden: true,
    },
  },
  {
    path: '/layout',
    name: 'layout',
    component: () => import('@/layout/index.vue'),
    redirect: '/home',
    children: [
      {
        path: '/home',
        name: 'home',
        component: () => import('@/views/home/home.vue'),
        meta: {
          title: '系统首页',
          hidden: false,
          icon: 'HomeFilled',
        },
      },
    ],
    meta: {
      title: 'layout',
      hidden: false,
      icon: 'HomeFilled',
    },
  },
]

// 任意路由
export const anyRoute = [
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
      title: '任意路由',
      hidden: true,
      icon: 'Warning',
    },
  },
]